package huadi.concurrent.daemon;

public class Daemon {
    public static void main(String[] args) throws Exception {
        DaemonThread t = new DaemonThread();
        t.setDaemon(true);// this is set t thread as a daemon thread.
        t.start();
        Thread.sleep(2000);
        System.out.println("main thread exit.");
    }
}

